#!/usr/bin/env zunit

@test 'nnn' {
  run zinit light-mode for jarun/nnn
  zinit cd jarun/nnn
  run PREFIX=$ZPFX make install; assert $state equals 0
  local nnn="$ZPFX/bin/nnn";     assert $nnn   is_executable
  $nnn -V;                       assert $state equals 0
}
@test 'pipes' {
  run zinit light-mode for @pipeseroni/pipes.sh
  zinit cd pipeseroni/pipes.sh
  run make PREFIX=$ZPFX install;    assert $state equals 0
  local pipes="$ZPFX/bin/pipes.sh"; assert $pipes is_executable
  $pipes -v;                        assert $state equals 0
}
@test 'tree' {
  run zinit light-mode for Old-Man-Programmer/tree
  zinit cd Old-Man-Programmer/tree
  run make PREFIX=$ZPFX install; assert $state equals 0
  local tree="$ZPFX/bin/tree";   assert $tree  is_executable
  $tree -v;                      assert $state equals 0
}
@test 'vim' {
  run zinit light-mode for vim/vim
  zinit cd vim/vim
  run ./configure --prefix=$ZPFX && make PREFIX=$ZPFX install
  assert $state equals 0
  local vim="$ZPFX/bin/vim"; assert $vim is_executable
  $vim --version; assert $state equals 0
}
# @test 'zsh_bin' {
#   run zinit as'null' sbin'bin/zsh' for @romkatv/zsh-bin
#   assert $state equals 0
#   local zsh_static="$ZPFX/bin/zsh"
#   assert "$zsh_static" is_executable
#   $zsh_static --help
#   assert $state equals 0
# }

# vim:ft=zsh:sw=2:sts=2:et:foldmarker=@test,}:foldmethod=marker
